package com.ophiux.appoint;

import com.baomidou.mybatisplus.core.incrementer.IKeyGenerator;
import com.baomidou.mybatisplus.extension.incrementer.OracleKeyGenerator;
import com.ophiux.common.swagger.annotation.EnableSwagger3;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.core.env.ConfigurableEnvironment;

/**
 * @desc: 
 * @author: hhl
 * @date：2023/9/21 16:00
 */
@SpringBootApplication
@EnableSwagger3
public class AppointApplication {
    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(AppointApplication.class, args);
        ConfigurableEnvironment environment = run.getEnvironment();
//        System.out.println("使用配置环境："+environment.getProperty("spring.profiles.active"));
        System.out.println("http://127.0.0.1:5100/swagger-ui/index.html");
    }

    @Bean
    public IKeyGenerator keyGenerator(){
        return new OracleKeyGenerator();
    }
}
